<?php

namespace mpend\modules\cms\models;

use Yii;

/**
 * 推荐文章模型
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class ChannelArticleSearch extends \mpend\models\searchs\ArticleSearch {

    /**
     * @inheritdoc
     */
    public function buildQuery($alias = 't') {
        $query = parent::buildQuery($alias);
        if ($alias) {
            $alias .= '.';
        }
        $query->andWhere([
            $alias . 'channel_id' => $this->channel_id
        ]);
        $query->debug();
        return $query;
    }

}
